package com.zhuss.product.db.dao.ext;

import com.zhuss.product.db.entity.Product;
import com.zhuss.bean.bo.product.product.SearchProductBo;
import com.zhuss.bean.vo.product.product.ListProductVo;
import com.zhuss.bean.vo.product.product.DetailProductVo;
import java.util.List;
import org.apache.ibatis.annotations.*;
import com.zhuss.product.db.dao.gen.*;

/**
 * @description: 商品数据库Dao
 * @author: zhushanshuo
 * @create: Wed Mar 24 22:26:45 CST 2021
 **/

@Mapper
public interface ProductDao extends ProductMapper {
	
	void create(Product record);
	
	void delete(Product record);
	
	Integer used(@Param("productId") Long productId, @Param("count") Long count);

	List<Product> listAll();

	List<Product> listById(@Param("productIdList") List<Long> productIdList);
	
	List<Product> listByName(@Param("name") String name);
	
	List<ListProductVo> list(SearchProductBo bo);
	
	Integer countList(SearchProductBo bo);

	DetailProductVo detail(@Param("productId") Long productId);

}
